package com.huadi.ssm.service;

import com.huadi.ssm.mapper.ProjectMapper;
import com.huadi.ssm.po.Project;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ProjectServiceImpl implements ProjectService {

    @Autowired
    private ProjectMapper projectMapper;

    @Override
    public Project findByName(String name) {
        return projectMapper.findByName(name);
    }

    @Override
    public int add(Project project) {
        return projectMapper.add(project);
    }

    @Override
    public int edit(Project project) {
        return projectMapper.edit(project);
    }

    @Override
    public int delete(String ids) {
        return projectMapper.delete(ids);
    }

    @Override
    public List<Project> findList(Map<String, Object> queryMap) {
        return projectMapper.findList(queryMap);
    }

    @Override
    public List<Project> findAll() {
        return projectMapper.findAll();
    }

    @Override
    public int getTotal(Map<String, Object> queryMap) {
        return projectMapper.getTotal(queryMap);
    }

    @Override
    public List<Project> findByResearchid(String researchid) {
        return projectMapper.findByResearchid(researchid);
    }

    @Override
    public Project findByID(Long projectid) {
        return projectMapper.findByID(projectid);
    }
}
